import 'package:image_picker/image_picker.dart';

final ImagePicker _imagePicker = ImagePicker();

//选取图片
Future<XFile?> pickerImageFile() async {
  return _imagePicker.pickImage(source: ImageSource.gallery);
}

//拍照
Future<XFile?> pickerImageCamera() async {
  return _imagePicker.pickImage(source: ImageSource.camera);
}